export interface Position {
    x: number;
    y: number;
}

export interface Endpoint {
    id: string;
    type: 'source' | 'target';
}

export interface Node {
    id: string;
    type: string;
    title: string;
    icon: string;
    color: string;
    position: Position;
    endpoints?: Endpoint[];
    draggable?: boolean;
}

export interface Connection {
    id: string;
    sourceId: string;
    targetId: string;
    label?: string;
}

export type NodeType =
    | 'start'
    | 'model'
    | 'end'
    | 'agent'
    | 'ifelse'
    | 'iterator'
    | 'code'
    | 'template'
    | 'http'
    | 'database'
    | 'email';

export interface EmailConfig {
    subject?: string;
    content?: string;
    recipients?: string[];
    cc?: string[];
    bcc?: string[];
    attachments?: string[];
}

export interface Node {
    id: string;
    type: NodeType;
    position: {
        x: number;
        y: number;
    };
    name?: string;
    title?: string;
    icon?: string;
    color?: string;
    endpoints?: {
        input: any[];
        output: any[];
    };
    params?: {
        input: any[];
        output: any[];
    };
    modelType?: string;
    prompt?: string;
    tools?: any[];
    language?: string;
    condition?: string;
    iterationKey?: string;
    method?: string;
    url?: string;
    emailConfig?: EmailConfig;
}

export interface Connection {
    id: string;
    source: string;
    target: string;
    data?: any;
} 